package com.wtb.javatool.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("catalog")
public class Catalog {

    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    @TableField("name")
    private String name;

    @TableField("band_id")
    private Long bandId;

    @TableField("parent_id")
    private Long parentId;

    @TableField("order")
    private Integer order;

    @TableField("level")
    private Integer level;

    @TableField("school_id")
    private Long schoolId;

    //子目录
    @TableField(exist = false)
    private List<Catalog> childCatalog;
    //目录中的资源
    @TableField(exist = false)
    private List<Assets> assets;


}
